<?php
namespace app\console\validate;

use think\Validate;

class ShopGoodsSpec extends Validate
{
    protected $rule = [
        ['goods_type_id', 'require'],
        ['title', 'require'],
    ];

    protected $message = [
        'title.require'         => '请填写名称',
        'goods_type_id.require' => '请选择品牌',
    ];

    protected $scene = [
        'create' => ['title', 'goods_type_id'],
    ];
}